﻿//编辑采集内容
EditLookArticleContent = function(id,pageIndex) {

    var EditLookArticleContentForm = Ext.create("Ext.form.Panel", {
        width: 360,
        height: 450,
        autoScroll: true, 
        plain: true,
        layout: "anchor",
        defaultType: "textfield",
        labelWidth: 55,
        baseCls: "x-plain",
        defaults: { labelAlign: 'right', anchor: "90%", msgTarget: "side" },
        buttonAlign: "center",
        bodyStyle: "padding:0 0 0 0",
        items: [{
            name: "Title",
            fieldLabel: "<font color='red'>*</font>文章标题",
            allowBlank: false,
            blankText: "文章标题不能为空",
            regexText: "请填写1～150个数字或字母"
        }, new Ext.create("Ext.ux.ueditor", {
                name: "TextContent",
                labelAlign: 'right',
                allowBlank: false,
                fieldLabel: "<font color='red'>*</font>文章内容",
                width: 600,
                height: 600
            })
			]
    });

    var EditLookArticleContentWin = new Ext.Window({
        title: "修改采集内容",
        width: 800,
        height: 450,
        plain: true,
        layout: "fit",
        //iconCls: "addicon",
        //不可以随意改变大小
        resizable: false,
        //是否可以拖动
        //draggable:false,
        defaultType: "textfield",
        //labelWidth: 100,
        collapsible: true, //允许缩放条
        closeAction: 'hide',
        closable: true,
        //弹出模态窗体
        modal: 'true',
        buttonAlign: "center",
        bodyStyle: "padding:10px 0 0 15px",
        items: [EditLookArticleContentForm],
        listeners: {
            "show": function() {
                if (id && id != "") {
                    //加载表单数据
                    EditLookArticleContentForm.form.load(
                                {
                                    url: "/manager/Module_Article/Look/" + id,
                                    method: "get",
                                    success: function(form, action) {

                                    },
                                    failure: function(form, action) {
                                        Ext.Msg.alert("提示信息", "对不起加载数据失败!请联系管理员");
                                    }
                                }
                    );
                }
            }
        },
        buttons: [{
            text: "重置",
            minWidth: 70,
            qtip: "重置数据",
            handler: function() {
                //加载表单数据
                EditLookArticleContentForm.getForm().reset();
                EditLookArticleContentForm.form.load(
                                {
                                    url: "/manager/LookArticleContent/Look/" + id,
                                    method: "get",
                                    success: function(form, action) {
                                    },
                                    failure: function(form, action) {
                                        //Ext.Msg.alert("提示信息","对不起加载数据失败!请联系管理员");
                                    }
                                }
                    );
            }
        }, {
            text: "取 消",
            minWidth: 70,
            handler: function() {
                EditLookArticleContentWin.hide();
            }

}]

        });

        EditLookArticleContentWin.show();
    }
